﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Chowpoo.Diagnose;

namespace CourseSystem.Stat
{
    public class UrlStatThread : ThreadDiagnosable
    {
        protected override bool RelaxAfterExecution()
        {
            //处理学生
            foreach (var item in UrlStat.StudentUrlStatDic)
            {
                //无活动3分钟
                if (item.Value.LastUpdateTime.AddMinutes(3).CompareTo(DateTime.Now) < 0)
                {
                    //TODO,更新数据库

                    UrlStat.StudentUrlStatDic.Remove(item.Key);
                }
            }
            return true;
        }
    }
}
